//
//  Model.m
//  EasyGo
//
//  Created by newhuidong on 16/2/1.
//  Copyright © 2016年 HuiDong. All rights reserved.
//

#import "Model.h"

@implementation Model
+(instancetype)ModelWithDic:(NSDictionary *)dic{
    
    
    return [[self alloc]initWithDic:dic];
    
}
-(instancetype)initWithDic:(NSDictionary *)dic{
    if (self=[super init]) {
        
        NSNumberFormatter * numberFormatter=[[NSNumberFormatter alloc]init];
        self.ID=[[numberFormatter stringFromNumber:dic[@"Id"]] intValue ];
        self.OrderNum=dic[@"OrderNum"];
        
        self.LineName=dic[@"LineName"];
        self.LinID=[[numberFormatter stringFromNumber:dic[@"LinID"]] intValue];
        self.PeoCount=[[numberFormatter stringFromNumber:dic[@"PeoCount"]]intValue];
        self.Status=[[numberFormatter stringFromNumber:dic[@"Status"]]intValue];
        self.LeftCount=[[numberFormatter stringFromNumber:dic[@"LeftCount"]]intValue];
        self.Type=[[numberFormatter stringFromNumber:dic[@"Type"]]intValue];

        self.EndTime=dic[@"EndTime"];
        
        
    }
    
    return self;
}
@end
